import request from "@/utils/request.js";
import baseUrl from "@/utils/version.js";

export function delete_dept(id) {
    return request.delete(baseUrl.system.v1 + `/dept/${id}`);
}

export function update_dept(id, data) {
    return request.put(baseUrl.system.v1 + `/dept/${id}`, data);
}

export function status_dept(id) {
    return request.put(baseUrl.system.v1 + `/dept/status/${id}`);
}

export function get_dept(id) {
    return request.get(baseUrl.system.v1 + `/dept/${id}`);
}

export function list_dept_tree() {
    return request.get(baseUrl.system.v1 + "/dept/list/tree");
}